package com.lzl.web;

import java.io.IOException;
import java.lang.reflect.Method;
import java.rmi.server.ServerCloneException;
import java.util.HashMap;
import java.util.Map;
public class DispatcherServlet {
    private static final long serialVersionUID = -3619491573769301637L;

    private String webPackage = "com.ktjy.web";
    private ControllerMappingManager ctrlMappingMgr;

    protected Map<String, Object> controllers=new HashMap<String, Object>();

    protected Map<String, Method>methods = new HashMap<String, Method>();
/*
    public void init() throws ServletException{
        String webPackage = this.getServletConfig().getInitParameter("webPackage");
        if (!(webPackage == null || (webPackage = webPackage.trim().equals(""))))
            this.webPackage = webPackage;

        ctrlMappingMgr = new ControllerMappingManager(this.webPackage);

        synchronized (controllers){
            controllers.clear();
        }
        synchronized (methods){
            methods.clear();
        }
    }*/
/*
    public void destroy(){
        super.destroy();
        synchronized (controllers){
            controllers.clear();
        }
        synchronized (methods){
            methods.clear();
        }
        this.ctrlMappingMgr.getControllerMappings().clear();
    }*/

    /*public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServerCloneException, IOException{
        this.doGet(request,response);
    }

    public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServerCloneException,IOException{
        request.setCharacterEncoding("UTF-8");
        response.setCharacterEncoding("UTF-8");
        execute(request,response);
    }*/
}
